package com.guigu.qingcheng.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.util.Date;

@ToString
@ApiModel("统计流量表")
@Table(name = "tb_browse")
public class TbBrowse {
    @ApiModelProperty(value = "商品spu_id")
    @NotNull(message="spu_id不能为空")
    @Id
    @Column(name = "spu_id")
    private String spuId;

    /**
     * 统计日期
     */
    @ApiModelProperty(value = "浏览日期")
    @Column(name = "browse_date")
    private Date browseDate;

    /**
     * 浏览人数
     */
    @ApiModelProperty(value = "浏览人数")
    private Integer numVisitors;

    /**
     * 独立访客
     */
    @ApiModelProperty(value = "独立访客")
    private Integer independentVisitors;

    public String getSpuId() {
        return spuId;
    }

    public TbBrowse() {
    }

    public TbBrowse(@NotNull(message = "spu_id不能为空") String spuId, Date browseDate, Integer numVisitors, Integer independentVisitors) {
        this.spuId = spuId;
        this.browseDate = browseDate;
        this.numVisitors = numVisitors;
        this.independentVisitors = independentVisitors;
    }

    public void setSpuId(String spuId) {
        this.spuId = spuId;
    }

    public Date getBrowseDate() {
        return browseDate;
    }

    public void setBrowseDate(Date browseDate) {
        this.browseDate = browseDate;
    }

    public Integer getNumVisitors() {
        return numVisitors;
    }

    public void setNumVisitors(Integer numVisitors) {
        this.numVisitors = numVisitors;
    }

    public Integer getIndependentVisitors() {
        return independentVisitors;
    }

    public void setIndependentVisitors(Integer independentVisitors) {
        this.independentVisitors = independentVisitors;
    }
}
